<table class="tests-table">
    <thead>
        <tr>
            {% for ua in ordered_uas %}
            <th><a href="{{ ua.get_absolute_url}}">{{ ua }}</a></th>
            {% endfor %}
        </tr>
    </thead>
    <tbody>
        {% for test in test_list %}

        {% if show_test_links %}
        <tr>
            <td colspan="{{ ordered_uas|length }}" class="test-url">
                <a href="{{ test.get_absolute_url }}">
                    {{ test }} ({{ test.type }})
                </a>
            </td>
        </tr>
        {% endif %}
        <tr>
            {% for result in test.ordered_results %}
            <td class="test-result">
                <a href="{{ result.get_absolute_url }}"
                   class="result result-{{ result.status|lower }}"
                   title="{{ result.ua }} {{ result.status }}">
                    {{ result.status }}
                </a>
            </td>
            {% endfor %}
        </tr>
        {% endfor %}
    </tbody>
</table>
